/*
 * SonarQube
 * Copyright (C) 2009-2017 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
@import (reference) "../variables";
@import (reference) "../mixins";
@import (reference) "ui";

@leftPadding: 10px;
@rightPadding: 10px;
@topPadding: 8px;
@bottomPadding: 8px;
@lineHeight: @baseFontSize * 1.5;

.coding-rule {
  padding: @topPadding @rightPadding @bottomPadding @topPadding;
  border: 1px solid transparent;
  background-color: #fff;

  &.selected {
    border-color: @blue !important;
  }
}

.coding-rule + .coding-rule {
  border-top-color: @barBorderColor;
}

.coding-rule.selected + .coding-rule {
  border-top-color: transparent;
}

.coding-rule-table {
  width: 100%;

  td {
    vertical-align: top;
  }
}

.coding-rule-table + .coding-rule-table {
  margin-top: 5px;
}

.coding-rule-table-meta-cell {
  width: 1px;
  white-space: nowrap;
}

.coding-rule-title {
  line-height: @lineHeight;
  font-size: @baseFontSize;
}

.coding-rule-meta {
  padding-left: 30px;
  line-height: @lineHeight;
  font-size: @smallFontSize;

  .icon-tags:before {
    color: @secondFontColor;
    font-size: @smallFontSize;
  }

  .js-tag:after {
    content: ",";
  }

  .js-tag:last-child:after {
    content: "";
  }
}

.coding-rule-activation {
  width: 40px;
  line-height: @lineHeight;
}

.coding-rule-activation-actions {
  padding-left: 20px;
}

.coding-rule-section-separator {
  height: 10px;
  margin: 0 -10px;
  border-top: 1px solid @barBorderColor;
  border-bottom: 1px solid @barBorderColor;
  background-color: @barBackgroundColor;
}
